package com.octopus.optiworks.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

@Entity
@Table
public class Step170_2Data implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private Long id;
	
	private Product product;
	
	private String operator;
	
	private Date date;
	
	private String rlPportParm1;
	
	private String rlPportParm2;
	
	private String rlPportParm3;
	
	private String rlRportParm1;
	
	private String rlRportParm2;
	
	private String rlRportParm3;
	
	private String rlCportParm1;
	
	private String rlCportParm2;
	
	private String rlCportParm3;
	
	private String dirPrParm1;
	
	private String dirPrParm2;
	
	private String dirPrParm3;
	
	private String dirRpParm1;
	
	private String dirRpParm2;
	
	private String dirRpParm3;
	
	private String testLightCode2;
	
	private String testLightPowerCode2;
	
	private String workingSection2;
	
	private String remark;
	
	private String testResult;
	
	private String waiveSign;
	
	private Boolean hasRework;
	
	private Set<Step170_2DataRework> reworks;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PRODUCTID")
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	@Column
	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	@Column
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column
	public String getTestResult() {
		return testResult;
	}

	public void setTestResult(String testResult) {
		this.testResult = testResult;
	}

	@Column
	public String getRlPportParm1() {
		return rlPportParm1;
	}

	public void setRlPportParm1(String rlPportParm1) {
		this.rlPportParm1 = rlPportParm1;
	}

	@Column
	public String getRlPportParm2() {
		return rlPportParm2;
	}

	public void setRlPportParm2(String rlPportParm2) {
		this.rlPportParm2 = rlPportParm2;
	}

	@Column
	public String getRlPportParm3() {
		return rlPportParm3;
	}

	public void setRlPportParm3(String rlPportParm3) {
		this.rlPportParm3 = rlPportParm3;
	}

	@Column
	public String getRlRportParm1() {
		return rlRportParm1;
	}

	public void setRlRportParm1(String rlRportParm1) {
		this.rlRportParm1 = rlRportParm1;
	}

	@Column
	public String getRlRportParm2() {
		return rlRportParm2;
	}

	public void setRlRportParm2(String rlRportParm2) {
		this.rlRportParm2 = rlRportParm2;
	}

	@Column
	public String getRlRportParm3() {
		return rlRportParm3;
	}

	public void setRlRportParm3(String rlRportParm3) {
		this.rlRportParm3 = rlRportParm3;
	}

	@Column
	public String getRlCportParm1() {
		return rlCportParm1;
	}

	public void setRlCportParm1(String rlCportParm1) {
		this.rlCportParm1 = rlCportParm1;
	}

	@Column
	public String getRlCportParm2() {
		return rlCportParm2;
	}

	public void setRlCportParm2(String rlCportParm2) {
		this.rlCportParm2 = rlCportParm2;
	}

	@Column
	public String getRlCportParm3() {
		return rlCportParm3;
	}

	public void setRlCportParm3(String rlCportParm3) {
		this.rlCportParm3 = rlCportParm3;
	}

	@Column
	public String getDirPrParm1() {
		return dirPrParm1;
	}

	public void setDirPrParm1(String dirPrParm1) {
		this.dirPrParm1 = dirPrParm1;
	}

	@Column
	public String getDirPrParm2() {
		return dirPrParm2;
	}

	public void setDirPrParm2(String dirPrParm2) {
		this.dirPrParm2 = dirPrParm2;
	}

	@Column
	public String getDirPrParm3() {
		return dirPrParm3;
	}

	public void setDirPrParm3(String dirPrParm3) {
		this.dirPrParm3 = dirPrParm3;
	}

	@Column
	public String getDirRpParm1() {
		return dirRpParm1;
	}

	public void setDirRpParm1(String dirRpParm1) {
		this.dirRpParm1 = dirRpParm1;
	}

	@Column
	public String getDirRpParm2() {
		return dirRpParm2;
	}

	public void setDirRpParm2(String dirRpParm2) {
		this.dirRpParm2 = dirRpParm2;
	}

	@Column
	public String getDirRpParm3() {
		return dirRpParm3;
	}

	public void setDirRpParm3(String dirRpParm3) {
		this.dirRpParm3 = dirRpParm3;
	}

	@Column
	public String getTestLightCode2() {
		return testLightCode2;
	}

	public void setTestLightCode2(String testLightCode2) {
		this.testLightCode2 = testLightCode2;
	}

	@Column
	public String getTestLightPowerCode2() {
		return testLightPowerCode2;
	}

	public void setTestLightPowerCode2(String testLightPowerCode2) {
		this.testLightPowerCode2 = testLightPowerCode2;
	}

	@Column
	public String getWorkingSection2() {
		return workingSection2;
	}

	public void setWorkingSection2(String workingSection2) {
		this.workingSection2 = workingSection2;
	}
	
	@Column
	public String getWaiveSign() {
		return waiveSign;
	}

	public void setWaiveSign(String waiveSign) {
		this.waiveSign = waiveSign;
	}
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "step170_2Data")
	@OrderBy(value = "id")
	public Set<Step170_2DataRework> getReworks() {
		return reworks;
	}

	public void setReworks(Set<Step170_2DataRework> reworks) {
		this.reworks = reworks;
	}

	@Column
	public Boolean getHasRework() {
		return hasRework;
	}

	public void setHasRework(Boolean hasRework) {
		this.hasRework = hasRework;
	}
	
}
